home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / Vyzkuste / winhex / Boot Sector NTFS.txt < prev    next >
Text File  |  2001-02-05  |  2KB  |  49 lines

  1. template "Boot Sector NTFS"
  2.  
  3. // Template by Paul Mullen, pcguru@the-answer.com
  4. // last modified Jul 16, 2000
  5.  
  6. // To be applied to sector 0 of an NTFS-formatted
  7. // logical drive or to the mirror copy of the boot
  8. // sector, which will be located near then end of
  9. // the partition.
  10. // See Microsoft KB article Q153973, "Recovering NTFS boot Sector"
  11. // http://support.microsoft.com/support/kb/articles/Q153/9/73.asp
  12.  
  13. description "Boot sector of an NTFS partition"
  14. appliesto disk
  15. sector-aligned
  16.  
  17. requires 0x00    "EB"                     // bytes 0 to 2 are
  18. requires 0x02    "90"                    // JMP instruction
  19. requires 0x03    "4E 54 46 53 20"    // ID must be "NTFS"
  20. requires 0x1FE    "55 AA"                // "magic" signature
  21.  
  22. begin
  23.     read-only hex 3    "JMP instruction"            //00
  24.     char[8]                "SystemID"                    //03
  25.     uint16                "Bytes per sector"        //0B
  26.     uint8                    "Sectors per cluster"    //0D
  27.     uint16                "Reserved sectors"        //0E
  28.     hex 3                    "(always zero)"            //10
  29.     read-only hex 2    "(unused)"                    //13 
  30.     hex 1                    "Media descriptor"        //15
  31.     read-only hex 2    "(unused)"                    //16
  32.     uint16                "Sectors per track"        //18
  33.     uint16                "Heads"                        //1A
  34.     uint32                "Hidden Sectors"            //1C
  35.     read-only hex 4    "(unused)"                    //20
  36.     read-only hex 4    "(always 80 00 80 00)"    //24
  37.     int64                    "Total sectors"            //28
  38.     move -8 
  39.     hex 8                    "Total sectors (hex)"    //28
  40.     int64                    "Start C# $MFT"            //30
  41.     int64                    "Start C# $MFTMirr"        //38
  42.     uint32                "Clust per MFT rec"        //40
  43.     uint32                "Clust per index block"    //44
  44.     uint32                "Serial number (int)"    //48
  45.     move -4
  46.     hex 4                    "Serial number (hex)"    //48
  47.     goto 0x1FE            //boot load code follows
  48.     read-only hex 2    "Signature (55 AA)"        //1FE
  49. end